package com.zxkj.logistics.controller;

import com.zxkj.logistics.model.Module;
import com.zxkj.logistics.service.ModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("module")
public class ModuleController {
    @Autowired
    private ModuleService moduleService;

    @RequestMapping("findMenu")
    @ResponseBody
    public Map<String,Object> findUserMenu(String id){
        List<Module> moduleList = moduleService.findUserMenu(id);
        Map<String,Object> returnMap = new HashMap<String,Object>();
        returnMap.put("datas",moduleList);
        return returnMap;
    }
}
